home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / progjour / 1991 / 04 / v_save_s.c < prev    next >
C/C++ Source or Header  |  1991-05-03  |  543b  |  24 lines

  1. /*    v_save_s.c- Workhorse Function: Save Screen Region */
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <conio.h>
  6. #include <tools/viewport.h>
  7.  
  8. void _v_save_scr( iptr image, int row, int col, int nrows, int ncols )
  9. {
  10.     /* Copy the indicated region of the screen into image. */
  11.  
  12.     int i;
  13.     int buf[ VMAXCOLS ], *bp;
  14.  
  15.     while( --nrows >= 0 )
  16.     {
  17.         gettext( col+1, row+1, col+ncols, row+1, buf );
  18.         ++row;
  19.         bp = buf;
  20.         for( i = ncols ; --i >= 0 ; )
  21.             *image++ = *bp++;
  22.     }
  23. }
  24.